package router

import (
	"github.com/gin-gonic/gin"
	"seat-service/api"
)

type buildingsAdminRouter struct {
}

func (b *buildingsAdminRouter) buildingsRouterGroup(Router *gin.RouterGroup) *gin.RouterGroup {
	buildingsAdminApi := api.BuildingsAdminApi{}
	buildingsAdmin := Router.Group("/buildAdmin")
	{
		buildingsAdmin.POST("/condition/queryBuild", buildingsAdminApi.QueryBuildByCondition) //根据条件查询楼栋信息
		buildingsAdmin.POST("/one/addBuild", buildingsAdminApi.AddNewBuild)                   //单独增加楼栋
		buildingsAdmin.GET("/queryBuild/:build_id", buildingsAdminApi.QueryBuildById)         //根据id查询楼栋信息
		buildingsAdmin.POST("/update/build", buildingsAdminApi.ChangeBuildInformation)        //管理员修改楼栋信息
		buildingsAdmin.POST("/delete/builds", buildingsAdminApi.DeleteBuildByIds)             //管理员删除楼栋
		buildingsAdmin.GET("/get/allCampus", buildingsAdminApi.GetAllCampusInformations)      //得到所有的校区信息
		buildingsAdmin.GET("/get/campusId", buildingsAdminApi.GetCampusIdByName)              //根据校区名字得到校区id
		buildingsAdmin.POST("/excel/BuildInformation", buildingsAdminApi.AnalysisData)        //Excel表导入数据
		buildingsAdmin.POST("/get/excel", buildingsAdminApi.ExportBuildTemplate)              //获取Excel模板
	}
	return buildingsAdmin
}
